﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="reg.aspx.cs" Inherits="OMSWeb.reg" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
   <link href="lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="Stylesheet" type="text/css" />
    <script type="text/javascript" src="jquery-1.4.2.min.js"></script>
    <script src="lib/ligerUI/js/core/base.js" type="text/javascript"></script>
    <script src="lib/ligerUI/js/plugins/ligerTip.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $("#name").blur(function() {
                //alert('ok');
                if ($("#name").val() != '') {
                    var param = { name: $("#name").val() };
                    //alert(JSON.stringify(param))
                    $.ajax({

                        type: "get",
                        //contentType: "application/json",
                        url: "reg.aspx?name=" + $("#name").val(),
                        //data: JSON.stringify(param), //传送数组
                        dataType: "String",
                        success: function(result) {
                            //var resultD = result.d; //返回成果
                            //alert(resultD);
                            //alert('添加成功')
                            //alert(result);
                            if (result == '失败') {

                                //$("#show").show();
                                //$("#name").focus();
                                $("#name").ligerTip({ content: "已经注册" });
                            }
                            else {
                                $("#show").hide();
                            }
                        },
                        error: function(e) {
                            alert(e.responseText)
                        }

                    });



                }
                else {
                    alert('wu')
                }
            });
        });
</script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
   姓名： <input id="name" name="name" />
   <br />
   密码：<input id="pwd" name="pwd" />
    </div>
    <asp:Label ID="up" runat="server"></asp:Label>
    
    </form>
</body>
</html>
